import request from '@/utils/request'

const api = {
  getCollectDayUrl: '/hr_kq/get_collect_day',
  setCollectDayUrl: '/hr_kq/set_collect_day',
  reloadCollectUrl: '/hr_kq/reload_collect',
  getKqDeptUrl: '/hr_kq/get_kq_dept',
  getCollectDetailUrl: '/hr_kq/get_collect_detail',
  getQingjiaDetailUrl: '/hr_kq/get_qingjia_detail',
  getJiabanDetailUrl: '/hr_kq/get_jiaban_detail',
  getKqDeptTreeUrl: '/hr_kq/get_kq_dept_tree',
  getKqUserByDeptUrl: '/hr_kq/get_kq_user_bydept',
  reloadKqDeptUrl: '/hr_kq/reload_kq_dept',
  reloadKqUserUrl: '/hr_kq/reload_kq_user',
  getKqDateUrl: 'hr_kq_date/get_kq_date',
  addKqDateUrl: 'hr_kq_date/add_kq_date',
  editKqDateUrl: 'hr_kq_date/edit_kq_date',
  removeKqDateUrl: 'hr_kq_date/remove_kq_date',
  processKqDateDeptUrl: 'hr_kq_date/process_kq_date_dept',
  getKqDeptBydateUrl: 'hr_kq_date/get_kq_dept_bydate',
}
export async function getKqDeptBydateApi(params: Map<string, any>) {
  const res = await request({
    url: api.getKqDeptBydateUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function processKqDateDeptApi(params: Map<string, any>) {
  const res = await request({
    url: api.processKqDateDeptUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function removeKqDateApi(params: Map<string, any>) {
  const res = await request({
    url: api.removeKqDateUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function editKqDateApi(params: Map<string, any>) {
  const res = await request({
    url: api.editKqDateUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function addKqDateApi(params: Map<string, any>) {
  const res = await request({
    url: api.addKqDateUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function getKqDateApi(params: Map<string, any>) {
  const res = await request({
    url: api.getKqDateUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function reloadKqUserApi(params: Map<string, any>) {
  const res = await request({
    url: api.reloadKqUserUrl,
    method: 'get',
    params: params,
    timeout: 30000,
  })
  return res
}
export async function reloadKqDeptApi(params: Map<string, any>) {
  const res = await request({
    url: api.reloadKqDeptUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function getKqUserByDeptApi(params: Map<string, any>) {
  const res = await request({
    url: api.getKqUserByDeptUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function getKqDeptTreeApi(params: Map<string, any>) {
  const res = await request({
    url: api.getKqDeptTreeUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function getCollectDayApi(params: Map<string, any>) {
  const res = await request({
    url: api.getCollectDayUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function setCollectDayApi(params: Map<string, any>) {
  const res = await request({
    url: api.setCollectDayUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function reloadCollectApi(params: Map<string, any>) {
  const res = await request({
    url: api.reloadCollectUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function getKqDeptApi(params: Map<string, any>) {
  const res = await request({
    url: api.getKqDeptUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function getCollectDetailApi(params: Map<string, any>) {
  const res = await request({
    url: api.getCollectDetailUrl,
    method: 'post',
    data: params,
  })
  return res
}
export async function getQingjiaDetailApi(params: Map<string, any>) {
  const res = await request({
    url: api.getQingjiaDetailUrl,
    method: 'get',
    params: params,
  })
  return res
}
export async function getJiabanDetailApi(params: Map<string, any>) {
  const res = await request({
    url: api.getJiabanDetailUrl,
    method: 'get',
    params: params,
  })
  return res
}
